<template>
    <div class="home">
        <div style="outline: 1px solid blue; padding: 15px; margin-top: 15px">
            <h3>孙级</h3>
            <button @click="aaa++">{{ aaa }} ++</button>
        </div>
    </div>
</template>

<script lang="ts">
// defineComponent 函数，目的是定义一个组件，内部可传入一个配置对象
import { defineComponent, inject } from 'vue';

export default defineComponent({
	name: 'Home',
	components: {
	},
	setup(){
		let aaa = inject('aaa')
		return {
			aaa
		}
	}
});
</script>
